package org.knight.gearbox.security;

import org.knight.gearbox.model.UserVO;

import java.util.List;

public class UserContextUtil {

    private static ThreadLocal<UserVO> threadLocal = new ThreadLocal();


    public static Long getUserId() {
        return threadLocal.get().getId();
    }
    public static List<Long> getBuIds() {
     return   threadLocal.get().getBuIds();
    }


    public static void set(UserVO userVO) {
        threadLocal.set(userVO);
    }
}
